]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
screenshot: Improve accessibility of the icon label buttons
authorLukáš Tyrychtr <ltyrycht@redhat.com>
Fri, 26 Sep 2025 15:35:20 +0000 (17:35 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 14 Jan 2026 18:10:58 +0000 (19:10 +0100)
Set the label actor properly so the buttons have a label.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3893>
(cherry picked from commit 53dade4c0ab4f1dd4f1ba286d8e867360e32e54c)

js/ui/screenshot.js

index f3ac6fc28c1305d78c759f1fcefd7cde0f04f71c..1b39cccc700ccd20c3c483b2d1ef0faa64112821 100644 (file)
@@ -62,10 +62,12 @@ class IconLabelButton extends St.Button {
         this.set_child(this._container);
 
         this._container.add_child(new St.Icon({icon_name: iconName}));
-        this._container.add_child(new St.Label({
+        const labelActor = new St.Label({
             text: label,
             x_align: Clutter.ActorAlign.CENTER,
-        }));
+        });
+        this.set({labelActor});
+        this._container.add_child(labelActor);
     }
 });